<?php

namespace app\api\validate\order;

use think\Validate;

class Order extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
	    'id|参数' => 'require|number|>:0',
        'cid|优惠信息' => 'number|>:0',
        'total|支付金额' => 'require|float|>:0'
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [];

    /**
     * 定义场景
     * @var []
     */
    protected $scene = [
        'set' => ['id','cid','total']
    ];
}
